package client;

import both.StringFormatter;
import javax.swing.*;

public class Client extends JFrame {

    JTabbedPane tabPane;
    GameShowClient client = new GameShowClient();

    public Client(String N) {
        super(N);
        setExtendedState(JFrame.MAXIMIZED_BOTH);
        setResizable(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        tabPane = new JTabbedPane();
        tabPane.addTab(StringFormatter.formatString("Registration", StringFormatter.TAB_STR, 60), new RegistrationTab(client));
        tabPane.addTab(StringFormatter.formatString("Game", StringFormatter.TAB_STR, 60), new ClientGameTab(client));
        /*try {
         tabPane.addTab("", new ImageIcon(ImageIO.read(new File("C:/Group Project/start_backup.png"))), new JPanel());
         } catch (IOException e) {
         e.printStackTrace();
         }*/
        add(tabPane);
        pack();
        setVisible(true);

    }

    public static void main(String[] args) {
        new Client("Client");
    }
}
